<template>
  <!--催收行动代码-->
  <Card class="csxddm page-fill" style="height:900px">
    <div class="table-data" style="">
      <v-table :columns="columns1" :data="data1"></v-table>
      <div class="bottom-container">
        <div class="left-bottom-form">
          <v-form inline>
            <v-form-item>
              <v-button size="small" type="primary" @on-click="handleRouteGo(path+'editor?type=0')">新建</v-button>
            </v-form-item>
            <v-form-item>
              <v-select v-model="currentSelect" :select-list="optionsData" ></v-select>
            </v-form-item>
            <v-form-item>
              <v-input></v-input>
            </v-form-item>
            <v-form-item>
              <v-button size="small" type="primary" >筛选</v-button>
            </v-form-item>
          </v-form>
        </div>
      </div>
    </div>
    <div class="pagi-box">
      <v-pagination :total="total2" :current-page="currentPage2" :page-size="pageSize2" @on-page-change="handlePageChange2">
      </v-pagination>
    </div>
  </Card>
</template>

<script>
export default {
  data () {
    return {
      gdh: '',
      currentSelect: '',
      path: this.$route.path,
      optionsData: [
        {
          value: '选项1',
          label: '黄金糕'
        }, {
          value: '选项2',
          label: '双皮奶'
        }, {
          value: '选项3',
          label: '蚵仔煎'
        }, {
          value: '选项4',
          label: '龙须面'
        }, {
          value: '选项5',
          label: '北京烤鸭'
        }
      ],
      columns1: [
        {
          title: 'ID',
          key: 'id'
        },
        {
          title: '催收行动代码名称',
          key: 'csxddmmc'
        },
        {
          title: '催收行动代码备注',
          key: 'csxddmbz'
        },
        {
          title: '修改用户',
          key: 'xgyh'
        },
        {
          title: '修改时间',
          key: 'xgsj'
        },
        {
          title: '操作',
          render: function (h) {
            const vm = this
            return h('div', {}, [
              h('v-button', {
                props: {
                  type: 'text'
                },
                style: {
                  fontSize: '12px'
                },
                on: {
                  'on-click' () {
                    vm.$router.push(vm.path + 'editor')
                  }
                }
              }, '查看'),
              h('v-button', {
                props: {
                  type: 'text'
                },
                style: {
                  fontSize: '12px',
                  marginLeft: '5px'
                },
                on: {
                  'on-click' () {
                    vm.$router.push(vm.path + 'editor?type=1')
                  }
                }
              }, ' 编辑'),
              h('v-button', {
                props: {
                  type: 'text'
                },
                style: {
                  fontSize: '12px',
                  marginLeft: '5px'
                }
              }, ' 删除')
            ])
          }.bind(this)
        }
      ],
      data1: [
        {
          id: '1232323',
          khxm: 'hello'
        }
      ],
      total2: 1200,
      currentPage2: 1,
      pageSize2: 20
    }
  },
  methods: {
    handlePageChange2 (index) {
      this.currentPage2 = index
    },
    handleRouteGo (pathName) {
      this.$router.push(pathName)
    }
  }
}
</script>

<style lang="less">
.csxddm {
}
</style>
